<script type="text/javascript">
$(function(){
	$('.days td').each(function(){
		$(this).click(function(){
			$day_num = $(this).find('.day_num').text();
			if($day_num != ''){
				$year = '<?=$this->uri->segment(4)?>';
				$month = '<?=$this->uri->segment(5)?>';
				if($year =='' || $month == ''){
					$year= '<?=date('Y')?>';
					$month= '<?=date('m')?>';
					}
				window.location.href="<?=site_url()?>tool/tools/date/"+$year+"/"+$month+"/"+$day_num;
				
			}
			})		
	
		})
})
</script>
<div class="body">
<?=$calendar?>
</div>